package com.yonyou.cyxdms.sysAuth.service.dto.notification;

import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;

import java.io.Serializable;

/**
 * <p>
 * 通知通告之经销商
 * </p>
 *
 * @author adu
 * @since 2019-10-14
 */

public class NotificationDealerListDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 通知通告之经销商ID
     */
    private Long notificationDealerId;

    /**
     * 经销商ID
     */
    private Long dealerId;


    /**
     * 经销商名称
     */
    private String dealerName;

    /**
     * 经销商公司ID
     */
    private Long dealerCompanyId;


    /**
     * 所有者代码(经销商代码)
     */
    private String ownerCode;

    /**
     * 所属区域
     */
    private String saleArea;

    public NotificationDealerListDTO() {
        super();
    }

    public Long getDealerId() {
        return dealerId;
    }

    public void setDealerId(Long dealerId) {
        this.dealerId = dealerId;
    }

    public String getDealerName() {
        return dealerName;
    }

    public void setDealerName(String dealerName) {
        this.dealerName = dealerName;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getNotificationDealerId() {
        return notificationDealerId;
    }

    public void setNotificationDealerId(Long notificationDealerId) {
        this.notificationDealerId = notificationDealerId;
    }

    public Long getDealerCompanyId() {
        return dealerCompanyId;
    }

    public void setDealerCompanyId(Long dealerCompanyId) {
        this.dealerCompanyId = dealerCompanyId;
    }

    public String getSaleArea() {
        return saleArea;
    }

    public void setSaleArea(String saleArea) {
        this.saleArea = saleArea;
    }

    @Override
    public String toString() {
        return "NotificationDealerListDTO{" +
                "notificationDealerId=" + notificationDealerId +
                ", dealerId=" + dealerId +
                ", dealerName='" + dealerName + '\'' +
                ", dealerCompanyId=" + dealerCompanyId +
                ", ownerCode='" + ownerCode + '\'' +
                ", saleArea='" + saleArea + '\'' +
                '}';
    }

    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param poClass dto 需要转换的dto
     * @author chengliang
     * @since 2019-09-17
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author chengliang
     * @since 2019-09-17
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "notificationDealerId");
    }

}
